home *** CD-ROM | disk | FTP | other *** search
-
-
- function AutomaticTaskTable()
- {
- this.ID = "tblAutomaticTask";
- this.tbl = new DataTable();
- this.tbl.ID = this.ID;
- this.tbl.Cellspacing = "0";
- this.tbl.Cellpadding = "0";
- this.tbl.Width = "100%";
- this.tbl.Class = "module_items list";
- this.tbl.Border = "0";
-
- this.Add = __AutomaticTaskTableAdd;
-
- //obj : AutomaticTask
- function __AutomaticTaskTableAdd(obj)
- {
- var heading = "<span class=\"module_item_heading\"> " + obj.Heading + " </span>" + obj.Detail;
-
- var button = "<div style=\"text-align:right;\" id=\"divBtn_" + obj.ID + "\" class=\"action_buttons_col\">";
-
- if( obj.Enabled )
- button += obj._EnableButton;
- else
- button += obj._DisableButton;
- obj += " </div>";
-
- this.tbl.Add(heading, button );
- this.tbl.ChangeClassInRowByIndex(0, "toprow");
- }
- }
-
-
- function AutomaticTask(id)
- {
- this.ID = id;
- this.Heading = "heading";
- this.Detail = "Detail";
- this.Enabled = false;
-
- this._EnableButton = "<img src="+btLOC_img_Enabled+" onmousedown=\"this.src=btLOC_img_EnabledToDisabled\" onmouseout=\"this.src=btLOC_img_Enabled\" onmouseover=\"this.src=btLOC_img_Enabled_hover\" onclick=\"external.DoOnTaskEnableClick('" + this.ID + "')\" class=\"hand\" border=\"0\" />";
- this._DisableButton = "<img src="+btLOC_img_Disabled+" onmousedown=\"this.src=btLOC_img_DisabledToEnabled\" onmouseout=\"this.src=btLOC_img_Disabled\" onmouseover=\"this.src=btLOC_img_Disabled_hover\" onclick=\"external.DoOnTaskEnableClick('" + this.ID + "')\" class=\"hand\" border=\"0\" />";
-
- this.Render = __AutomaticTaskRender;
- this.IsRendered = __AutomaticTaskIsRendered;
- this.Enable = __AutomaticTaskEnable;
-
-
- function __AutomaticTaskIsRendered()
- {
- return Get( "divBtn_" + this.ID ) == null ? false : true;
- }
-
- function __AutomaticTaskRender()
- {
- var html = "";
- return "";
- }
-
- //value: bool
- function __AutomaticTaskEnable(value)
- {
- if(this.IsRendered())
- Get("divBtn_" + this.ID).innerHTML = value ? this._EnableButton : this._DisableButton ;
- }
- }
-
-